package algorithm.dailyQuestion.day20250324;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.countPrefixes(new String[]{"a","b","c","ab","bc","abc"},"abc"));
    }
    static class Solution {
        public int countPrefixes(String[] words, String s) {
            int count = 0;
            for (String word : words) {
                if (s.startsWith(word)) {
                    count++;
                }
            }
            return count;

        }
    }
}
